package cn.com.czpb.client.module.personal.adapter;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.com.czpb.client.R;
import cn.com.czpb.client.custorm.CircleImageView;
import cn.com.czpb.client.model.news.CommBean;
import cn.com.czpb.client.model.usercenter.ComBean;
import cn.com.czpb.client.utils.TextUtils;

/**
 * Created by Administrator on 2017/7/14.
 */

public class MyCommAdapter extends BaseMultiItemQuickAdapter<ComBean, BaseViewHolder> {
    private List<CommBean.ChildrenEntity> list;
    public MyCommAdapter(List<ComBean> data) {
        super(data);
        addItemType(0,R.layout.item_comm_my);
    }

    @Override
    protected void convert(BaseViewHolder helper, ComBean item) {
        Glide.with(mContext).load(item.getAvatarPath()).into((CircleImageView) helper.getView(R.id.iv_com_my));
        helper.setText(R.id.name_com_my, TextUtils.getLengthText(item.getNickname(), 8));
        helper.setText(R.id.content_comm_my, item.getContent());
        helper.setText(R.id.mycom_time, item.getDateline());
    }
}
